package com.itboye.ihomebank.activity.myzhujia.qianbao;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.base.BaseOtherActivity;
import com.itboye.ihomebank.constants.SPContants;
import com.itboye.ihomebank.util.ByAlert;
import com.itboye.ihomebank.util.SPUtils;

/**
 * 支付密码
 * 
 */
public class ActivityZhiFuPass extends BaseOtherActivity {
	View v_statusbar;
	TextView add_shap_title_tv;
	ImageView close_icon;

	RelativeLayout zhifu_shezhi, zhifu_chongzhi;
	String pass;
	boolean isChange = true;

	@Override
	public void onClick(View v) {
		Intent intent;
		switch (v.getId()) {
		case R.id.close_icon:
			finish();
			break;
		case R.id.zhifu_shezhi:// 设置支付密码
			pass = SPUtils.get(this, null, SPContants.WalletPass, "") + "";
			if (!pass.equals("")) {
				ByAlert.alert("支付密码已设置");
			} else {
				intent = new Intent(this, ActivityZhiFuPassSheZhi.class);
				startActivity(intent);
			}

			break;
		case R.id.zhifu_chongzhi:// 重置支付密码
			intent = new Intent(this, ActivityZhiFuPassChongZhi.class);
			startActivity(intent);
			break;

		default:
			break;
		}

	}

	@Override
	protected int layout_id() {
		return R.layout.activity_zhifu_pass;
	}

	@Override
	protected void onInitController() {

	}

	@Override
	protected void onInit() {
		setStatusBarHeight(v_statusbar);
		add_shap_title_tv.setText("支付密码设置");

	}

	@Override
	protected void onStart() {
		super.onStart();
		isChange = (boolean) SPUtils.get(this, null, SPContants.IS_ZHIFU_PASS,
				false);
	}

	@Override
	protected void onReadIntent(Bundle bundle) {

	}

}
